	$(function(){
		$("table:eq(1) tr:lt(2) td[class='header']").bind("click",function (){
			$("table:eq(1) tr").find("td[class!='header']:eq("+$(this).index()+")").toggleClass("highlight");
		});
		
		$("table:gt(0)").attr("cellpadding","1").attr("cellspacing","1").attr("border","0");
		
		$("table:gt(0) tr:even").addClass("toggle");
	});

	function setLineBGColor(obj){
		$(obj).find("td").toggleClass("highlight");
	}
	
	
	function soRetry(soReqNo){
		
		var request = $.ajax({
			url : "soRetry.jsp",
			type : "POST",
			data : {
				SO_REQ_NO : soReqNo
			},
			dataType : "html"
		});
		
		request.done(function(msg) {
			//alert(msg);
			$('#stat'+soReqNo).html("Retry is Completed");
		});
		
		request.fail(function(jqXHR, textStatus) {
			alert("Request failed: " + textStatus);
		});
	}
	
	function poRetry(poReqNo){
		
		var request = $.ajax({
			url : "poRetry.jsp",
			type : "POST",
			data : {
				PO_REQ_NO : poReqNo
			},
			dataType : "html"
		});
		
		request.done(function(msg) {
			//alert(msg);
			$('#stat'+poReqNo).html("Retry is Completed");
		});
		
		request.fail(function(jqXHR, textStatus) {
			alert("Request failed: " + textStatus);
		});
	}
	
    function fiRetry(fiReqNo){
		
		var request = $.ajax({
			url : "fiRetry.jsp",
			type : "POST",
			data : {
				DOC_PAPER_NO : fiReqNo
			},
			dataType : "html"
		});
		
		request.done(function(msg) {
			//alert(msg);
			$('#stat'+fiReqNo).html("Retry is Completed");
		});
		
		request.fail(function(jqXHR, textStatus) {
			alert("Request failed: " + textStatus);
		});
	}